package com.littrabble.sort;

public class Select {

	public static void sort(int[] data, int n) {

		for (int i = 0; i < n; i++) {

			int j = i;
			for (int k = i + 1; k < n; k++) {
				if (data[j] > data[k]) {
					j = k;
				}
			}

			int tmp = data[i];
			data[i] = data[j];
			data[j] = tmp;
		}
	}
}
